import React from 'react'
import {Routes,Route} from 'react-router-dom'
import Home from './views/Home'
import About from './views/About'
import Product from './views/Product'
import HotLession from './views/HotLession'
import NewsLession from './views/NewsLession'
import PayLession from './views/PayLession'
import Java from './views/Java'
import H5 from './views/H5'
import Test from './views/Test'
export default function App() {
  return (
    <Routes>
        {/* 
          配置路由的时候，Routes将Route包裹起来
          Route中的常用属性
          - path：路由必须要使用/作为开头
          - element:引入的组件,注意：必须使用标签形式将其扩起来
        */}
        <Route path='/' element={<Home></Home>}></Route>
        <Route path='/about' element={<About></About>}></Route>
        <Route path='/product' element={<Product></Product>}>
           {/* 二级路由的path属性的值无需加入/ */}
           <Route path='hot' element={<HotLession/>}>
              {/* 三级路由 */}
              <Route path='java' element={<Java/>}></Route>
              <Route path='h5' element={<H5/>}></Route>
              <Route path='test' element={<Test/>}></Route>
           </Route>
           <Route path='news' element={<NewsLession/>}></Route>
           <Route path='pay' element={<PayLession/>}></Route>
        </Route>
    </Routes>
  )
}
